< previous page page_455 next page >

Page 455
APPENDIX C
THE APIGID32.DLL LIBRARY
The functions described in this Appendix are part of the apigid32.dll dynamic link library. This DLL, provided by Desaware, contains a number of routines that should prove useful when working with API functions. The source code for this library is included on the CD that comes with this book. You may distribute the DLL with your compiled Visual Basic applications. However, Desaware does not provide free support for this DLL.
Numeric Functions
The following functions operate on numeric variables, providing features that are difficult to implement in Visual Basic due to its lack of unsigned data types.
agDWORDto2Integers
Declare Function agDWORDto2Integers Lib "apigid32.dll" (ByVal 1 As Long, lw As _
Integer,
Many Windows API functions return a long variable that contains two integers. This function provides an efficient way to separate the two integers. The value passed in parameter l is divided, with the low 16 bits loaded into the lw parameter and the high 16 bits loaded into the lh parameter.
agPOINTStoLong
Declare Function agPOINTStoLong Lib "apigid32.dll" (pt As POINTS) As Long
Converts a POINTS structure into a Long, placing the X field in the low 16 bits of the result and the Y field in the high 16 bits of the result. This function is convenient for Windows API functions that expect POINTS structures to be passed as Long parameters.

 
< previous page page_455 next page >